<div class="block_in_wrapper">
	
	<h2>{#addcompany#}</h2>
	
	<p>{#obligatory_fields#}</p>

	<form class="main" method="post" action="admin.php?action=addcompany" enctype="multipart/form-data" {literal}onsubmit="return validateCompleteForm(this);"{/literal} >
		
		<fieldset>
			
			<div class="row">
				<label for="parent_id">{#company_parent#}:</label>
				<select name="parent_id" id="parent_id">
					<option value="0">{#none#}</option>
					{foreach key=key item=company from=$companies_select}
					<option value="{$company.ID}">{$company.hierarchy}</option>
					{/foreach}
				</select>
			</div>
			
			<div class="row">
				<label for="name">{#name#}: <span style="color:#f00;">*</span></label>
				<input type="text" class="text" name="name" id="name" required="1" realname="{#name#}" />
			</div>
			
			<div class="row">
				<label for="email">{#email#}:</label>
				<input type="text" class="text" name="email" id="email" realname="{#email#}" />
			</div>
			
			<div class="row">
				<label for="phone">{#phone#}:</label>
				<input type="text" class="text" name="phone" id="phone" realname="{#phone#}" />
			</div>
			
			<div class="row">
				<label for="address_1">{#address#} 1:</label>
				<input type="text" class="text" name="address_1" id="address_1" realname="{#address#}1" />
			</div>
			
			<div class="row">
				<label for="address_2">{#address#} 2:</label>
				<input type="text" class="text" name="address_2" id="address_2" realname="{#address#}2" />
			</div>
			
			<div class="row">
				<label for="state">{#state#}:</label>
				<input type="text" class="text" name="state" id="state" realname="{#state#}" />
			</div>
			
			<div class="row">
				<label for="country">{#country#}:</label>
				<input type="text" class="text" name="country" id="country" realname="{#country#}" />
			</div>
			
			<div class="row">
				<label for="logo">{#logo#}:</label>
				<input type="file" name="logo" id="logo" />
			</div>

			<div class="row">
				<label>{#members#}:</label>
				<div style="float:left;">
					{section name=user loop=$users}
					<div class="row">
						<input type="checkbox" class="checkbox" value="{$users[user].ID}" name="assignto[]" id="{$users[user].ID}" />
						<label for="{$users[user].ID}">{$users[user].name}</label>
					</div>
					{/section}
				</div>
			</div>
			
			<div class="row-butn-bottom">
				<label>&nbsp;</label>
				<button type="submit" onfocus="this.blur();">{#addbutton#}</button>
				
				{if $companies == "1"}
				<button type = "reset" onclick="blindtoggle('form_addcompany');toggleClass('add_company','add-active','add');toggleClass('add_butn_companies','butn_link_active','butn_link');toggleClass('sm_companies','smooth','nosmooth');return false;" onfocus="this.blur();">{#cancel#}</button>
				{else}
				<button type = "reset" onclick="blindtoggle('form_{$companies[project].ID}');return false;">{#cancel#}</button>
				{/if}
			</div>
			
		</fieldset>
		
	</form>

</div>